package com.jack.database_exp.mapper;

import com.jack.database_exp.bean.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersMapper {
    @Options(useGeneratedKeys = true,keyProperty = "id")
    @Insert("insert into orders (price,num,uid,gname,status) values(#{price},#{num},#{uid},#{gname},#{status})")
    int insertOrders(Orders orders);
    @Select("select * from orders")
    public List<Orders> queryOrders();

}
